package com.yonyou.cyxdms.sysAuth.service.mapper;

import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.sysAuth.service.entity.PositionPO;
import com.yonyou.cyxdms.sysmanage.client.vo.user.UserInfoVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 职务 Mapper 接口
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
public interface PositionMapper extends SuperMapper<PositionPO> {

    /**
     * @author     ：quankk
     * @date       ：2019/7/11 17:19
     * @description：
     */
    List<Map<String, Object>> findAllPositionByIsValid(@Param("isValid") int isValid);

    List<Integer> getPositions(@Param("userId") Long userId, @Param("companyId") Long companyId);

    List<Integer> getPositionsByUserOrgId(@Param("userOrgId") Long userOrgId);

    List<UserInfoVO> findUserByPositionAndOrgIds(@Param("positionCode") Integer positionCode, @Param("orgIds") String[] orgIds, @Param("userOrgId") Long userOrgId);
}
